Skip to content

refactor(idp): make find a paginated UEG shortcut - #831

Open
htoordd wants to merge 1 commit into
DataDog:mainfrom
htoordd:codex/idp-find-ueg-shortcut
Open

htoordd wants to merge 1 commit into
DataDog:mainfrom
htoordd:codex/idp-find-ueg-shortcut

Conversation

@htoordd

@htoordd htoordd commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Summary

pup idp find already queried the Unified Entity Graph, but its interface and guidance still made it look like a legacy lookup. This change keeps it as a small, service-first UEG shortcut while making idp entities query the primary interface for non-service and advanced graph work.

Changes

  • Add --limit (default 10, range 1-100) and --cursor to idp find.
  • Treat simple text literally before building the service-name wildcard query, so spaces and DSL operators cannot change its structure.
  • Preserve explicit kind: or concrete ref: queries for compatibility while directing new non-service workflows to idp entities query.
  • Share query-scope validation with idp entities query, including errors for ambiguous top-level OR, quoted kinds, and the unsupported free_text pseudo-field.
  • Preserve the raw UEG JSON:API response and add accurate page count, truncation, and next-cursor guidance for agents.
  • Update command help, examples, the service-catalog agent, and the dd-idp skill to describe find as a service-first paginated convenience command.
  • Correct adjacent Service Catalog agent guidance: relations is read-only, and kind deletion takes a kind ID.

Testing

  • cargo fmt --all -- --check
  • cargo clippy --all-targets -- -D warnings
  • cargo test -- --test-threads=1 ...: 2,015 passed, 0 failed, with two known environment-specific tests filtered
  • Focused IDP, CLI parsing, and skill test suites
  • Official skill validator for skills/dd-idp
  • WASI and browser WASM builds
  • Verified current CLI help exposes only relations list and names the kind-delete argument KIND_ID
  • Live Datadog Staging smoke tests for service-name pagination, second-page cursor advancement, hyphenated names, literal spaces/operators, explicit team queries, concrete service refs, and guarded invalid queries/limits

Dependency audit

This change adds no dependencies. cargo audit --no-fetch reports four existing advisories in the upstream lockfile (h2, two rsa entries, and rustls); none were introduced or changed by this PR.

@htoordd
htoordd force-pushed the codex/idp-find-ueg-shortcut branch from 475ddb7 to f03a8b4 Compare September 16, 2026 21:26
Validate explicit query scope and reuse the shared entity graph request metadata. Expose cursor and limit controls while preserving the default raw response.
@htoordd
htoordd force-pushed the codex/idp-find-ueg-shortcut branch from f03a8b4 to 380a6cb Compare September 17, 2026 04:05
@htoordd htoordd changed the title refactor(idp): make find a paginated UEG shortcut refactor(idp): make find a paginated UEG shortcut Sep 17, 2026
@htoordd
htoordd marked this pull request as ready for review September 17, 2026 17:54
@htoordd
htoordd requested a review from a team as a code owner September 17, 2026 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant